package org.jeecg.modules.simulator.rooter;

import lombok.Getter;
import lombok.Setter;
import org.jeecg.modules.simulator.jsonot.NumPeopEnStationApiInfo;

import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.Map;

/**
 * @program: simulator-b20240918
 * @description:
 * @author: renzhg
 * @create: 2025-01-10 13:20
 **/
public class DataCalculateRooter {

    @Getter
    @Setter
    Map<String, Map<String, NumPeopEnStationApiInfo>> numPeopEnStationApiInfoMap = new HashMap<>();

    //计算进站量将来的数据
    public Map<String, NumPeopEnStationApiInfo> calculateInputFutureFiveMin(String now){
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss");
        LocalTime nowlocalTime = LocalTime.parse(now, formatter);
        LocalTime fiveNewTime = nowlocalTime.plusMinutes(5);
        String formattedTime = fiveNewTime.format(formatter);
       return numPeopEnStationApiInfoMap.get(formattedTime);

    }

}
